home
***
CD-ROM
|
disk
|
FTP
|
other
***
search
/
Tech Arsenal 1
/
Tech Arsenal (Arsenal Computer).ISO
/
tek-01
/
soundhax.zip
/
TALK.C
< prev
next >
Wrap
C/C++ Source or Header
|
1991-12-19
|
2KB
|
106 lines
/*-------------------------------------------------------*/
/* Originally part of SOUNDHAX v1 by John M. Trindle */
/* FREEWARE 12/19/91 */
/*-------------------------------------------------------*/
#include <stdio.h>
#include <stdlib.h>
#define CMS_AVAILABLE 1
#define FM_AVAILABLE 2
#define CV_AVAILABLE 4
#define OFF 0
#define ON 1
#define FALSE 0
#define TRUE 1
extern ct_io_addx;
extern ct_int_num;
extern ct_voice_status;
extern ct_music_status;
static int StatusWord;
char *VoiceDriver;
/* Disables Text Driver!!
sbts_unload();
*/
/* Says ASCIIZ string in buffer
sbts_say(buffer);
*/
typedef struct
{
char length;
char Text[255];
} WordString;
extern int sbts_parser(char *buffer1, char *buffer2, int p1);
main(int argc, char *argv[])
{
int DriverFeatures,VersionCode,RetVal;
int gender,tone,volume,pitch,speed,i,j;
char buffer[255],buffer2[255],*TempPtr;
WordString SubWord;
ct_io_addx = 0x220; /* I/O Base */
DriverFeatures = ct_card_here();
if (DriverFeatures & CMS_AVAILABLE)
printf("C/MS Music Available\n");
if (DriverFeatures & FM_AVAILABLE)
printf("FM Music Available\n");
if (DriverFeatures & CV_AVAILABLE)
printf("Creative Voice Available\n");
else
{
printf("Sound Blaster or Compatible NOT detected\n");
exit(1);
}
VersionCode = sbc_version();
printf("SBV Version = %d.%d\n",VersionCode >> 8, VersionCode & 0xff);
sbc_scan_int();
printf("Interrupt = %d\n",ct_int_num);
RetVal = ctvd_init(6);
printf("ctvd_init = RetVal = %d\n",RetVal);
RetVal = sbts_init();
printf("Init RetVal = %d\n",RetVal);
gender = 1;
tone = 3;
volume = 13;
pitch = 8;
speed = 8;
while(gets(buffer)!=NULL)
{
sbts_say(buffer);
sbts_parser(buffer,buffer2,0);
for (i = 0; i < 255; i++)
j = i;
fprintf(stderr,"%-30s %s\n",buffer,buffer2);
printf("%-30s %s\n",buffer,buffer2);
}
ctvd_speaker(OFF);
ctvd_terminate();
}